package com.example.demo.dao;

import com.example.demo.entity.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author Administrator
 * @className wuyp
 * @description:
 * @Date 2022/3/24 18:10
 **/
@Repository
public interface SysUserDao extends JpaRepository<SysUser,Integer> {
    @Query("select u from  SysUser  u  where u.username =?1")
   SysUser findByUsername(String userName);
    @Query("select u from  SysUser  u  where u.username =?1  and  u.password =?2")
    SysUser getUser(String username,String password);


}
